home *** CD-ROM | disk | FTP | other *** search
- diff -u -r --new-file last-version/docs/README.jis samba-1.9.14alpha20/docs/README.jis
- --- last-version/docs/README.jis Fri Sep 15 20:17:28 1995
- +++ samba-1.9.14alpha20/docs/README.jis Thu Sep 21 20:47:16 1995
- @@ -112,7 +112,7 @@
-
- 5. $B$=$NB>(B
-
- - hex $B7A<0$NJQ495Z$S(BUNIX $B>e$G$N%U%!%$%kL>$NJQ49J}K!$O!"(B
- + hex $B7A<0$NJQ49J}K!$O!"(B
-
- $BBgLZ!wBgDM!&C^GH(B <ohki@gssm.otsuka.tsukuba.ac.jp>$B;a(B
-
- diff -u -r --new-file last-version/source/Makefile samba-1.9.14alpha20/source/Makefile
- --- last-version/source/Makefile Fri Sep 15 20:20:29 1995
- +++ samba-1.9.14alpha20/source/Makefile Thu Sep 21 20:24:34 1995
- @@ -162,7 +162,7 @@
-
- # This is for SUNOS5 (also known as Solaris 2)
- # contributed by Andrew.Tridgell@anu.edu.au
- -# FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP -DBSD_COMP
- +# FLAGSM = -DSUNOS5 -DSHADOW_PWD -DNETGROUP
- # LIBSM = -lsocket -lnsl
-
-
- diff -u -r --new-file last-version/source/change-log samba-1.9.14alpha20/source/change-log
- --- last-version/source/change-log Wed Sep 20 00:33:10 1995
- +++ samba-1.9.14alpha20/source/change-log Thu Sep 21 20:57:12 1995
- @@ -1583,7 +1583,11 @@
- from Ian McEwan <ijm@doc.ic.ac.uk>)
- - fixed "guest only" bug
- - sambatar patches from Ricky
- -
- + - printing.c patches from Dirk.DeWachter@rug.ac.be
- + - rewrote become_user()
- + - sunos5 patch from Niels.Baggesen@uni-c.dk
- + - more japanese extensions patches from fujita@ainix.isac.co.jp
- + - released alpha20
-
- ==========
- todo:
- diff -u -r --new-file last-version/source/includes.h samba-1.9.14alpha20/source/includes.h
- --- last-version/source/includes.h Wed Sep 20 01:21:06 1995
- +++ samba-1.9.14alpha20/source/includes.h Thu Sep 21 20:49:47 1995
- @@ -233,6 +233,7 @@
- #include <sys/statfs.h>
- #include <sys/statvfs.h>
- #include <sys/filio.h>
- +#include <sys/sockio.h>
- #include <netinet/in_systm.h>
- #include <netinet/tcp.h>
- #include <netinet/ip.h>
- @@ -827,7 +828,7 @@
- #endif
-
- #ifndef perror
- -#define perror(s) printf("%s: %s\n",s,strerror(errno))
- +#define perror(m) printf("%s: %s\n",m,strerror(errno))
- #endif
-
- #ifndef MAXHOSTNAMELEN
- diff -u -r --new-file last-version/source/ipc.c samba-1.9.14alpha20/source/ipc.c
- --- last-version/source/ipc.c Wed Sep 20 01:26:25 1995
- +++ samba-1.9.14alpha20/source/ipc.c Thu Sep 21 20:49:48 1995
- @@ -1227,7 +1227,7 @@
- !become_service(Files[i].cnum,True))
- break;
-
- - if (rename(Files[i].name,name) == 0)
- + if (sys_rename(Files[i].name,name) == 0)
- string_set(&Files[i].name,name);
- break;
- }
- diff -u -r --new-file last-version/source/kanji.h samba-1.9.14alpha20/source/kanji.h
- --- last-version/source/kanji.h Fri Sep 15 20:17:44 1995
- +++ samba-1.9.14alpha20/source/kanji.h Thu Sep 21 20:49:48 1995
- @@ -33,7 +33,7 @@
-
- /* FOR SHIFT JIS CODE */
- #define is_shift_jis(c) \
- - ((0x80 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \
- + ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \
- || (0xe0 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xef))
- #define is_shift_jis2(c) \
- (0x40 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xfc \
- diff -u -r --new-file last-version/source/printing.c samba-1.9.14alpha20/source/printing.c
- --- last-version/source/printing.c Sat Sep 16 11:45:51 1995
- +++ samba-1.9.14alpha20/source/printing.c Thu Sep 21 20:27:02 1995
- @@ -360,7 +360,7 @@
- static int jobid;
- static int jobprio;
- static time_t jobtime;
- - static int jobstat=LPSTAT_OK;
- + static int jobstat=LPQ_QUEUED;
- /* to store minimum priority to print, lpstat command should be invoked
- with -p option first, to work */
- static int base_prio;
- @@ -439,9 +439,10 @@
- }
- else {
- jobstat = LPQ_QUEUED;
- - if ((strequal(tok[8],"on")) ||
- - ((strequal(tok[8],"from")) && (strequal(tok[10],"on"))))
- - jobstat = LPQ_PRINTING;
- + if ((count >8) && (((strequal(tok[8],"on")) ||
- + ((strequal(tok[8],"from")) &&
- + ((count > 10)&&(strequal(tok[10],"on")))))))
- + jobstat = LPQ_PRINTING;
- }
-
- header_line_ok=True; /* information is correct */
- @@ -658,7 +659,7 @@
- break;
- }
-
- - bzero((char *)(*queue),sizeof(**queue));
- + bzero((char *)&(*queue)[count],sizeof(**queue));
-
- /* parse it */
- if (!parse_lpq_entry(snum,line,&(*queue)[count],status,count==0))
- diff -u -r --new-file last-version/source/reply.c samba-1.9.14alpha20/source/reply.c
- --- last-version/source/reply.c Sat Sep 16 12:09:39 1995
- +++ samba-1.9.14alpha20/source/reply.c Thu Sep 21 20:49:48 1995
- @@ -2493,7 +2493,7 @@
- strcat(directory,mask);
- if (resolve_wildcards(directory,newname) &&
- can_rename(directory,cnum) &&
- - !rename(directory,newname)) count++;
- + !sys_rename(directory,newname)) count++;
- } else {
- void *dirptr = NULL;
- char *dname;
- @@ -2521,7 +2521,7 @@
- if (!can_rename(fname,cnum)) continue;
- strcpy(destname,newname);
- if (resolve_wildcards(fname,destname) &&
- - !rename(fname,destname)) count++;
- + !sys_rename(fname,destname)) count++;
- DEBUG(3,("reply_mv : doing rename on %s -> %s\n",fname,destname));
- }
- CloseDir(dirptr);
- diff -u -r --new-file last-version/source/server.c samba-1.9.14alpha20/source/server.c
- --- last-version/source/server.c Tue Sep 19 14:46:56 1995
- +++ samba-1.9.14alpha20/source/server.c Thu Sep 21 20:49:48 1995
- @@ -1585,90 +1585,67 @@
- BOOL become_user(int cnum, int uid)
- {
- user_struct *vuser;
- - int snum;
- + int snum,gid;
- + int ngroups;
- + gid_t *groups;
-
- - if (!OPEN_CNUM(cnum))
- - {
- - DEBUG(2,("Connection %d not open\n",cnum));
- - return(False);
- - }
- + if (!OPEN_CNUM(cnum)) {
- + DEBUG(2,("Connection %d not open\n",cnum));
- + return(False);
- + }
-
- - if (done_become_user == uid)
- - {
- - DEBUG(4,("Skipping become_user - already user\n"));
- - return(True);
- + snum = Connections[cnum].service;
- +
- + if (lp_security() == SEC_SHARE || (*lp_force_user(snum))) {
- + uid = Connections[cnum].uid;
- + gid = Connections[cnum].gid;
- + groups = Connections[cnum].groups;
- + ngroups = Connections[cnum].ngroups;
- + } else {
- + vuser = get_valid_user_struct(uid);
- + if (!vuser) {
- + DEBUG(2,("Invalid vuid used %d\n",uid));
- + return(False);
- }
- + uid = vuser->uid;
- + if(!*lp_force_group(snum))
- + gid = vuser->gid;
- + else
- + gid = Connections[cnum].gid;
- + groups = vuser->user_groups;
- + ngroups = vuser->user_ngroups;
- + }
- +
- + if (done_become_user == uid) {
- + DEBUG(4,("Skipping become_user - already user\n"));
- + return(True);
- + }
-
- if (done_become_user != -1)
- unbecome_user();
-
- - snum = Connections[cnum].service;
- -
- - /* Check if the user id given has been validated
- - If so, become that user, else become the opener
- - of the connection.
- - *** NOTE *** SHOULD THIS JUST FAIL INSTEAD if get_valid_user_struct
- - returns NULL ?????
- - */
- - if(!(*lp_force_user(snum)) && (vuser = get_valid_user_struct(uid)))
- - {
- - DEBUG(5,("got valid user_struct for uid %d\n", uid));
- - if (initial_uid == 0)
- - {
- - int gid_to_become;
- - if(!*lp_force_group(snum))
- - gid_to_become = vuser->gid;
- - else
- - gid_to_become = Connections[cnum].gid;
- -
- - if (!become_gid(gid_to_become))
- - return(False);
- -
- -#ifndef NO_SETGROUPS
- - if (!IS_IPC(cnum))
- - {
- - /* groups stuff added by ih/wreu */
- - if (vuser->user_ngroups > 0)
- - if (setgroups(vuser->user_ngroups,(GID_TYPE *)vuser->user_groups)<0)
- - DEBUG(0,("setgroups call failed!\n"));
- - }
- -#endif
- -
- - if (!Connections[cnum].admin_user && !become_uid(vuser->uid))
- - return(False);
- - }
- - }
- - else
- + if (initial_uid == 0)
- {
- - uid = Connections[cnum].uid; /* Set this so done_become_user
- - is set correctly */
- -
- - if (initial_uid == 0)
- - {
- - if (!become_gid(Connections[cnum].gid))
- - return(False);
- + if (!become_gid(gid)) return(False);
-
- #ifndef NO_SETGROUPS
- - if (!IS_IPC(cnum))
- - {
- - /* groups stuff added by ih/wreu */
- - if (Connections[cnum].ngroups > 0)
- - if (setgroups(Connections[cnum].ngroups,
- - (GID_TYPE *)Connections[cnum].groups)<0)
- - DEBUG(0,("setgroups call failed!\n"));
- - }
- + if (!IS_IPC(cnum)) {
- + /* groups stuff added by ih/wreu */
- + if (ngroups > 0)
- + if (setgroups(ngroups,(GID_TYPE *)groups)<0)
- + DEBUG(0,("setgroups call failed!\n"));
- + }
- #endif
-
- - if (!Connections[cnum].admin_user && !become_uid(Connections[cnum].uid))
- - return(False);
- - }
- + if (!Connections[cnum].admin_user && !become_uid(uid))
- + return(False);
- }
-
- old_umask = umask(0777 & ~(CREATE_MODE(cnum)));
-
- done_become_user = uid;
-
- - DEBUG(5,("become_user now uid=(%d,%d) gid=(%d,%d)\n",
- + DEBUG(5,("become_user uid=(%d,%d) gid=(%d,%d)\n",
- getuid(),geteuid(),getgid(),getegid()));
-
- return(True);
- @@ -2148,7 +2125,7 @@
- pstring name;
- fclose(dbf); dbf = NULL;
- sprintf(name,"%s.old",debugf);
- - rename(debugf,name);
- + sys_rename(debugf,name);
- reopen_logs();
- }
- }
- diff -u -r --new-file last-version/source/smb.h samba-1.9.14alpha20/source/smb.h
- --- last-version/source/smb.h Fri Sep 15 21:14:23 1995
- +++ samba-1.9.14alpha20/source/smb.h Thu Sep 21 20:58:15 1995
- @@ -561,6 +561,7 @@
- };
-
- /* and a few prototypes */
- +int sys_rename(char *from, char *to);
- int sys_select(fd_set *fds,struct timeval *tval);
- int sys_unlink(char *fname);
- int sys_open(char *fname,int flags,int mode);
- diff -u -r --new-file last-version/source/system.c samba-1.9.14alpha20/source/system.c
- --- last-version/source/system.c Fri Sep 15 21:18:15 1995
- +++ samba-1.9.14alpha20/source/system.c Thu Sep 21 21:01:05 1995
- @@ -182,3 +182,20 @@
- {
- return(utime(dos_to_unix(fname,False),times));
- }
- +
- +/*******************************************************************
- +for rename()
- +********************************************************************/
- +int sys_rename(char *from, char *to)
- +{
- +#ifdef KANJI
- + pstring zfrom, zto;
- + strcpy (zfrom, dos_to_unix (from, False));
- + strcpy (zto, dos_to_unix (to, False));
- + return rename (zfrom, zto);
- +#else
- + return rename (from, to);
- +#endif /* KANJI */
- +}
- +
- +
- diff -u -r --new-file last-version/source/trans2.c samba-1.9.14alpha20/source/trans2.c
- --- last-version/source/trans2.c Fri Sep 15 21:21:00 1995
- +++ samba-1.9.14alpha20/source/trans2.c Thu Sep 21 20:49:49 1995
- @@ -339,9 +339,7 @@
- }
-
-
- -#ifdef KANJI
- - kj_dos_format (fname, True);
- -#else
- +#ifndef KANJI
- unix2dos_format(fname, True);
- #endif
-
- diff -u -r --new-file last-version/source/util.c samba-1.9.14alpha20/source/util.c
- --- last-version/source/util.c Wed Sep 20 01:23:04 1995
- +++ samba-1.9.14alpha20/source/util.c Thu Sep 21 21:05:13 1995
- @@ -1051,11 +1051,9 @@
- {
- pstring namecopy;
- string_replace(fname,'\\','/');
- -#ifdef KANJI
- - kj_unix_format (fname, True);
- -#else
- +#ifndef KANJI
- dos2unix_format(fname, True);
- -#endif
- +#endif /* KANJI */
-
- if (*fname == '/')
- {
- @@ -1070,11 +1068,9 @@
- ****************************************************************************/
- void dos_format(char *fname)
- {
- -#ifdef KANJI
- - kj_dos_format (fname, True);
- -#else
- +#ifndef KANJI
- unix2dos_format(fname, True);
- -#endif
- +#endif /* KANJI */
- string_replace(fname,'/','\\');
- }
-
- @@ -3939,12 +3935,24 @@
- char *readdirname(void *p)
- {
- struct DIRECT *ptr;
- + char *dname;
-
- if (!p) return(NULL);
-
- ptr = (struct DIRECT *)readdir(p);
- if (!ptr) return(NULL);
-
- + dname = ptr->d_name;
- +
- +#ifdef KANJI
- + {
- + static pstring buf;
- + strcpy(buf, dname);
- + unix_to_dos(buf, True);
- + dname = buf;
- + }
- +#endif
- +
- #ifdef NEXT2
- if (telldir(p) < 0) return(NULL);
- #endif
- @@ -3954,17 +3962,17 @@
- of BSD and SYSV headers and libraries */
- {
- static BOOL broken_readdir = False;
- - if (!broken_readdir && !(*(ptr->d_name)) && strequal("..",ptr->d_name-2))
- + if (!broken_readdir && !(*(dname)) && strequal("..",dname-2))
- {
- DEBUG(0,("Your readdir() is broken. You have somehow mixed SYSV and BSD headers and libraries\n"));
- broken_readdir = True;
- }
- if (broken_readdir)
- - return(ptr->d_name-2);
- + return(dname-2);
- }
- #endif
-
- - return(ptr->d_name);
- + return(dname);
- }
-
-
- diff -u -r --new-file last-version/source/version.h samba-1.9.14alpha20/source/version.h
- --- last-version/source/version.h Wed Sep 20 01:46:17 1995
- +++ samba-1.9.14alpha20/source/version.h Thu Sep 21 21:06:09 1995
- @@ -1 +1 @@
- -#define VERSION "1.9.14alpha19"
- +#define VERSION "1.9.14alpha20"
-